package flc.ast.fragment;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import flc.ast.R;
import flc.ast.activity.SelVideoActivity;
import flc.ast.activity.VideoShootActivity;
import flc.ast.databinding.FragmentEditBinding;
import stark.common.basic.base.BaseNoModelFragment;
import stark.common.basic.event.EventStatProxy;

/**
 * A simple {@link Fragment} subclass.
 * Use the {@link EditFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class EditFragment extends BaseNoModelFragment<FragmentEditBinding> {



    @Override
    protected int onCreate() {
        return R.layout.fragment_edit;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent1(getActivity(), mDataBinding.event1Container);
        EventStatProxy.getInstance().statEvent5(getActivity(), mDataBinding.event5Container);
        mDataBinding.ivTakeVideo.setOnClickListener(this);
        mDataBinding.llVideoFilter.setOnClickListener(this);
        mDataBinding.llVideoCut.setOnClickListener(this);
        mDataBinding.llVideoRotate.setOnClickListener(this);
        mDataBinding.llVideoUpend.setOnClickListener(this);
        mDataBinding.llVideoSplice.setOnClickListener(this);
        mDataBinding.llVideoText.setOnClickListener(this);
        mDataBinding.llVideoBg.setOnClickListener(this);
        mDataBinding.llVideoTailor.setOnClickListener(this);
        mDataBinding.llVideoSpeed.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()){
            case R.id.ivTakeVideo:
                startActivity(VideoShootActivity.class);
                break;
            case R.id.llVideoFilter:
                SelVideoActivity.type=1;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.llVideoCut:
                SelVideoActivity.type=2;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.llVideoRotate:
                SelVideoActivity.type=3;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.llVideoUpend:
                SelVideoActivity.type=4;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.llVideoSplice:
                SelVideoActivity.type=5;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.llVideoText:
                SelVideoActivity.type=6;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.llVideoBg:
                SelVideoActivity.type=7;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.llVideoTailor:
                SelVideoActivity.type=8;
                startActivity(SelVideoActivity.class);
                break;
            case R.id.llVideoSpeed:
                SelVideoActivity.type=9;
                startActivity(SelVideoActivity.class);
                break;
        }
    }

    @Override
    protected void initData() {

    }
}